//P1464 Function:https://www.luogu.com.cn/problem/P1464

#include <iostream>
#include <cstring>

using namespace std;
typedef long long LL;

const int N = 25;

LL f[N][N][N];


LL w(LL a,LL b, LL c)
{
	if(a <= 0 || b <= 0 || c <= 0)return 1;
	else if(a > 20 || b > 20 || c > 20) a = 20 ,b = 20,c = 20;
	if(f[a][b][c] != -1)return f[a][b][c];
	
	if(a < b && b < c)
		f[a][b][c] = w(a,b,c-1) + w(a,b-1,c-1) - w(a,b-1,c);
	else
		f[a][b][c] = w(a-1,b,c) + w(a-1,b-1,c) + w(a-1,b,c-1) - w(a-1,b-1,c-1);
		
	return f[a][b][c];
	
}

int main()
{
	memset(f,-1,sizeof f);
	LL a,b,c;
	while(scanf("%lld%lld%lld",&a,&b,&c), a != -1 || b != -1 || c!=-1)
	{
		LL s = w(a,b,c);
		printf("w(%lld, %lld, %lld) = %lld\n",a,b,c,s);
	}
	return 0;
}
